<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>获取文本内容</title></title>
</head>
<body>
    <h1>OK</h1>
    <h1>KO</h1>
    <h1>Big</h1>
    <script>
        // let one= document.querySelector(`h1`)
        // console.log(one.innerHTML)
        
        let element =document.querySelectorAll(`h1`)
        console.log(element)
        element.forEach(function(elem,i){
            console.log(elem.innerHTML)
            
        })
        
    </script>
</body>
</html>